package listbyorder.access101_200.test172;

/**
 * @author code_yc
 * @version 1.0
 * @date 2020/6/14 13:58
 */
public class Solution1 {

    public int trailingZeroes(int n) {
        int count = 0;
        for (int i = 0; i <= n; i++) {
            int N = i;
            while (N > 0) {
                if (N % 5 == 0) {
                    count++;
                    N /= 5;
                } else {
                    break;
                }
            }
        }
        return count;
    }
}
